load("@rules_cc//cc:defs.bzl", "cc_library")

package(default_visibility = ["//visibility:public"])

cc_library(
    name = "boost.beast",
    hdrs = glob(
        [
            "include/**/*.hpp",
            "include/**/*.ipp",
        ],
        exclude = [
            "include/boost/beast/_experimental/http/impl/icy_stream.hpp",
            "include/boost/beast/_experimental/test/detail/stream_state.ipp",
            "include/boost/beast/_experimental/test/impl/error.hpp",
            "include/boost/beast/_experimental/test/impl/stream.hpp",
            "include/boost/beast/core/detail/buffer_traits.hpp",
            "include/boost/beast/core/detail/buffers_pair.hpp",
            "include/boost/beast/core/detail/impl/read.hpp",
            "include/boost/beast/core/detail/remap_post_to_defer.hpp",
            "include/boost/beast/core/detail/service_base.hpp",
            "include/boost/beast/core/detail/static_ostream.hpp",
            "include/boost/beast/core/detail/stream_base.hpp",
            "include/boost/beast/core/detail/work_guard.hpp",
            "include/boost/beast/core/impl/async_base.hpp",
            "include/boost/beast/core/impl/basic_stream.hpp",
            "include/boost/beast/core/impl/buffered_read_stream.hpp",
            "include/boost/beast/core/impl/buffers_cat.hpp",
            "include/boost/beast/core/impl/buffers_prefix.hpp",
            "include/boost/beast/core/impl/buffers_suffix.hpp",
            "include/boost/beast/core/impl/error.hpp",
            "include/boost/beast/core/impl/flat_buffer.hpp",
            "include/boost/beast/core/impl/flat_static_buffer.hpp",
            "include/boost/beast/core/impl/flat_stream.hpp",
            "include/boost/beast/core/impl/multi_buffer.hpp",
            "include/boost/beast/core/impl/read_size.hpp",
            "include/boost/beast/core/impl/saved_handler.hpp",
            "include/boost/beast/core/impl/static_buffer.hpp",
            "include/boost/beast/core/impl/string_param.hpp",
            "include/boost/beast/http/detail/rfc7230.hpp",
            "include/boost/beast/http/detail/rfc7230.ipp",
            "include/boost/beast/http/detail/type_traits.hpp",
            "include/boost/beast/http/impl/basic_parser.hpp",
            "include/boost/beast/http/impl/chunk_encode.hpp",
            "include/boost/beast/http/impl/error.hpp",
            "include/boost/beast/http/impl/field.ipp",
            "include/boost/beast/http/impl/fields.hpp",
            "include/boost/beast/http/impl/message.hpp",
            "include/boost/beast/http/impl/parser.hpp",
            "include/boost/beast/http/impl/rfc7230.hpp",
            "include/boost/beast/http/impl/rfc7230.ipp",
            "include/boost/beast/http/impl/serializer.hpp",
            "include/boost/beast/http/impl/status.ipp",
            "include/boost/beast/http/impl/verb.ipp",
            "include/boost/beast/http/impl/write.hpp",
            "include/boost/beast/http/rfc7230.hpp",
            "include/boost/beast/http/verb.hpp",
            "include/boost/beast/ssl.hpp",
            "include/boost/beast/ssl/ssl_stream.hpp",
            "include/boost/beast/websocket/detail/hybi13.ipp",
            "include/boost/beast/websocket/detail/pmd_extension.hpp",
            "include/boost/beast/websocket/detail/pmd_extension.ipp",
            "include/boost/beast/websocket/detail/service.hpp",
            "include/boost/beast/websocket/detail/service.ipp",
            "include/boost/beast/websocket/detail/soft_mutex.hpp",
            "include/boost/beast/websocket/impl/accept.hpp",
            "include/boost/beast/websocket/impl/close.hpp",
            "include/boost/beast/websocket/impl/error.hpp",
            "include/boost/beast/websocket/impl/handshake.hpp",
            "include/boost/beast/websocket/impl/ping.hpp",
            "include/boost/beast/websocket/impl/read.hpp",
            "include/boost/beast/websocket/impl/ssl.hpp",
            "include/boost/beast/websocket/impl/stream.hpp",
            "include/boost/beast/websocket/impl/stream_impl.hpp",
            "include/boost/beast/websocket/impl/teardown.hpp",
            "include/boost/beast/websocket/impl/write.hpp",
            "include/boost/beast/websocket/ssl.hpp",
            "include/boost/beast/zlib/impl/error.hpp",
        ],
    ),
    defines = [
        "BOOST_BEAST_SEPARATE_COMPILATION",
        #"BOOST_BEAST_USE_STD_STRING_VIEW",
        #"BOOST_NO_CXX17_HDR_STRING_VIEW",
    ],
    features = [
        "parse_headers",
    ],
    includes = ["include"],
    textual_hdrs = [
        "include/boost/beast/_experimental/http/impl/icy_stream.hpp",
        "include/boost/beast/_experimental/test/detail/stream_state.ipp",
        "include/boost/beast/_experimental/test/impl/error.hpp",
        "include/boost/beast/_experimental/test/impl/stream.hpp",
        "include/boost/beast/core/detail/buffer_traits.hpp",
        "include/boost/beast/core/detail/buffers_pair.hpp",
        "include/boost/beast/core/detail/impl/read.hpp",
        "include/boost/beast/core/detail/remap_post_to_defer.hpp",
        "include/boost/beast/core/detail/service_base.hpp",
        "include/boost/beast/core/detail/static_ostream.hpp",
        "include/boost/beast/core/detail/stream_base.hpp",
        "include/boost/beast/core/detail/work_guard.hpp",
        "include/boost/beast/core/impl/async_base.hpp",
        "include/boost/beast/core/impl/basic_stream.hpp",
        "include/boost/beast/core/impl/buffered_read_stream.hpp",
        "include/boost/beast/core/impl/buffers_cat.hpp",
        "include/boost/beast/core/impl/buffers_prefix.hpp",
        "include/boost/beast/core/impl/buffers_suffix.hpp",
        "include/boost/beast/core/impl/error.hpp",
        "include/boost/beast/core/impl/flat_buffer.hpp",
        "include/boost/beast/core/impl/flat_static_buffer.hpp",
        "include/boost/beast/core/impl/flat_stream.hpp",
        "include/boost/beast/core/impl/multi_buffer.hpp",
        "include/boost/beast/core/impl/read_size.hpp",
        "include/boost/beast/core/impl/saved_handler.hpp",
        "include/boost/beast/core/impl/static_buffer.hpp",
        "include/boost/beast/core/impl/string_param.hpp",
        "include/boost/beast/http/detail/rfc7230.hpp",
        "include/boost/beast/http/detail/rfc7230.ipp",
        "include/boost/beast/http/detail/type_traits.hpp",
        "include/boost/beast/http/impl/basic_parser.hpp",
        "include/boost/beast/http/impl/chunk_encode.hpp",
        "include/boost/beast/http/impl/error.hpp",
        "include/boost/beast/http/impl/field.ipp",
        "include/boost/beast/http/impl/fields.hpp",
        "include/boost/beast/http/impl/message.hpp",
        "include/boost/beast/http/impl/parser.hpp",
        "include/boost/beast/http/impl/rfc7230.hpp",
        "include/boost/beast/http/impl/rfc7230.ipp",
        "include/boost/beast/http/impl/serializer.hpp",
        "include/boost/beast/http/impl/status.ipp",
        "include/boost/beast/http/impl/verb.ipp",
        "include/boost/beast/http/impl/write.hpp",
        "include/boost/beast/http/rfc7230.hpp",
        "include/boost/beast/http/verb.hpp",
        "include/boost/beast/ssl.hpp",
        "include/boost/beast/ssl/ssl_stream.hpp",
        "include/boost/beast/websocket/detail/hybi13.ipp",
        "include/boost/beast/websocket/detail/pmd_extension.hpp",
        "include/boost/beast/websocket/detail/pmd_extension.ipp",
        "include/boost/beast/websocket/detail/service.hpp",
        "include/boost/beast/websocket/detail/service.ipp",
        "include/boost/beast/websocket/detail/soft_mutex.hpp",
        "include/boost/beast/websocket/impl/accept.hpp",
        "include/boost/beast/websocket/impl/close.hpp",
        "include/boost/beast/websocket/impl/error.hpp",
        "include/boost/beast/websocket/impl/handshake.hpp",
        "include/boost/beast/websocket/impl/ping.hpp",
        "include/boost/beast/websocket/impl/read.hpp",
        "include/boost/beast/websocket/impl/ssl.hpp",
        "include/boost/beast/websocket/impl/stream.hpp",
        "include/boost/beast/websocket/impl/stream_impl.hpp",
        "include/boost/beast/websocket/impl/teardown.hpp",
        "include/boost/beast/websocket/impl/write.hpp",
        "include/boost/beast/websocket/ssl.hpp",
        "include/boost/beast/zlib/impl/error.hpp",
    ],
    deps = [
        "@boost.asio",
        "@boost.assert",
        "@boost.bind",
        "@boost.config",
        "@boost.container",
        "@boost.container_hash",
        "@boost.core",
        "@boost.endian",
        "@boost.intrusive",
        "@boost.logic",
        "@boost.mp11",
        "@boost.optional",
        "@boost.preprocessor",
        "@boost.smart_ptr",
        "@boost.static_assert",
        "@boost.static_string",
        "@boost.system",
        "@boost.throw_exception",
        "@boost.type_index",
        "@boost.type_traits",
        "@boost.winapi",
    ],
)
